#include<iostream>
using namespace std;

class Solution {
public:
    bool isPalindrome(int x) {
    	int target = x;
        if (x < 0)
        	return false;
        long long i = 0;

        while(x/10){
        	i *= 10;
			i += x % 10;
			x/=10;
		}
		i *= 10;
		i += x;
//		cout<<(i == x)<<"\n";
		return i == target;
    }
};

int main(){
	Solution s;
	cout<<s.isPalindrome(1234567899);
	
	return 0;
}
 
